﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfUserLogin.aspx.cs" Inherits="msBsc.WebUi.mfUserLogin" %>

<!DOCTYPE HTML>
<html>
<head>
    <title>手机地接客商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/public/mLogin.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/home/base.css" charset="gbk" />
    <%=getBodyBeforeJs()%>
    <%--<script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js"
        type="text/javascript"></script>--%>
    <script type="text/javascript" src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/jmPage.js"></script>
    <script type="text/javascript" src="/themes/Style1/jsQt.js"></script>
    <script type="text/javascript" src="/jqPlugin/js/laytpl.js"></script>
    <script src="/jqPlugin/js/jquery.cookie.js"></script>
    <script type="text/javascript">
        $(window).load(function () {
        });
        //        $(window).bind('resize', function () { _self._ResizeHandler(_self); })
        //        .bind('scroll', function () { _self._ResizeHandler(_self); });
    </script>
    <!--head fix rgn-->
    <style type="text/css">
    </style>
    <base target="_self" />
</head>
<body>
    <div class="viewport">
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapHeaderMenuHtml(false) %>
        <form action='#' method="post" id="J_EmailForm">

            <input type="hidden" name="txtRetUrl" id="txtRetUrl" value="">
            <div class="new-txt-err" id="err" style="display: none;">
            </div>
            <%--<div style="margin-top: 26px;">
                用户名/邮箱：
            </div>--%>
            <div>
                <div class="c_input">
                    <%--<div class="c_title"><a style="margin-right: 10px">账户:</a></div>--%>
                    <div class="c_text">
                        <input type="text" value="" name="username" id="username" placeholder="请输入用户名/邮箱" onkeydown="changeColor(0,event)">
                        <a class="input_user"></a>
                    </div>
                    <%--<div class="c_icon">
                        <a class="input_user"></a>
                    </div>--%>
                </div>

            </div>
            <div>
                <div class="c_input">
                    <%--<div class="c_title"><a style="margin-right: 10px">密码:</a></div>--%>
                    <div class="c_text">
                        <input type="password" value="" name="password" id="password" placeholder="请输入密码" onkeydown="changeColor(1,event)">
                        <a class="input_pwd"></a>
                    </div>
                    <%--<div class="c_icon">
                        <a class="input_pwd"></a>
                    </div>--%>
                </div>
            </div>
            <input type="hidden" id="remember" value="true" name="remember">
            <div>
                <button type="button" class="btn btn-large btn_size" id="J_BtnEmailForm">登  录</button>
            </div>
            <div class="f_pwd">
                <div class="f_left">
                    <a href="/m/mp_UserRegister.htm">快速注册</a>
                </div>
                <div class="f_right">
                    <a href="/m/mp_ForgotPassword.htm">忘记密码?</a>
                </div>
            </div>
        </form>
        <script type="text/javascript">
            (function () {
                //退出登录
                jQuery.loadHtml('/pgajax.axd?LOGINOUT=1').done(function () { });
                var opart = new jsonRow();
                opart = addNoAreStatistics(opart, "用户登录", "w0001");

                opart.AddCell("ACTION", "init");
                if ($.cookie("rmbUser") == "true") {
                    $("#username").val($.cookie("account"));
                    opart.AddCell("password", $.cookie("password"));
                    ajaxComm(opart);
                } else {
                    opart.AddCell("password", "");
                    ajaxComm(opart);
                }
                $("#txtRetUrl").val(GetQueryStr("ReturnUrl"));
                $("#h_title").text("登录");
            })();
            $("#J_BtnEmailForm").live("click", function () {
                dologin();
            });
            function dologin() {
                if ($("#username").val() && $("#password").val()) {
                    if ($("#J_BtnEmailForm").val("") == "正在登录") {
                        return;
                    }
                    var _jsParam = new jsonRow();
                    _jsParam.AddCell("ACTION", "REGIST_STEP1");
                    _jsParam.AddCell("USER_NME", $("#username").val());
                    _jsParam.AddCell("USER_PASS", $("#password").val());
                    $("#J_BtnEmailForm").val("正在登录");
                    ajaxComm(_jsParam);
                } else {
                    alert("登录不成功：请输入登录名、密码");
                }
            };
            function RetToUrl() {
                var ut = $("#txtRetUrl").val();
                if (ut) {
                    window.location.href = ut;
                } else {
                    window.location.href = "/m/mp_Index.htm";
                }
            };
            //保存cookie
            function setCookie(account, pwd) {
                $.cookie("rmbUser", "true", { expires: 10 });
                $.cookie("account", account, { expires: 10 });
                $.cookie("password", pwd, { expires: 10 });
            }
        </script>
    </div>
</body>
<%=getBodyAfterJs() %>
</html>
